﻿#region License statement
// NJamb, a specification and delta-specification DSL
// Copyright (c) 2010-2011, Mark Knell
// Published under the MIT License; all other rights reserved
#endregion

#region using...
using System;
using NJamb.Specifications.Delta;
using NUnit.Framework;
#endregion

namespace NJamb.NUnit
{
    [TestFixture]
    public abstract class BDDFixtureBase<TSubject> : FixtureBase<TSubject>
        where TSubject : class
    {
        protected void Given(IDeltaSpecification deltaSpecification, params IDeltaSpecification[] additional)
        {
            _state.Expecting(deltaSpecification, additional);
        }

        protected void Then(Action assert, params Action[] additional)
        {
            _state.AndVerify(assert, additional);
        }

        protected void When(Action<TSubject> action)
        {
            _state.Action = action;
        }
    }
}
